#include "img_struct.h"

statistics_config_t ar0130_tile_config = {
	1,
	1,

	24,
	16,
	128,
	48,
	160,
	250,
	160,
	250,
	0,
	16383,

	12,
	8,
	0,
	8,
	340,
	512,

	8,
	5,
	256,
	10,
	448,
	816,
	448,
	816,

	0,
	16383,
};
 line_t ar0130_50hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY100, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY50, ISO_100, 0}}, {{SHUTTER_1BY50, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_51200,0}}
		}
};

 line_t ar0130_60hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY120, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY60, ISO_100, 0}}, {{SHUTTER_1BY60, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_51200,0}}
		}
};
img_awb_param_t ar0130_awb_param = {
	{
		{1500, 1024, 1700},	//AUTOMATIC

		{1050, 1024, 2625},	//INCANDESCENT
		{1300, 1024, 2225},	//D4000
		{1500, 1024, 1700},	//D5000
		{1600, 1024, 1450},	//SUNNY //{1875, 1024, 1400}
		{1700, 1024, 1425},	//CLOUDY
		{1024, 1024, 1024},	//FLASH
		{1024, 1024, 1024},	//FLUORESCENT
		{1024, 1024, 1024},	//FLUORESCENT_H
		{1024, 1024, 1024},	//UNDER WATER
		{1875, 1024, 1400},	//CUSTOM
		{1600, 1024, 1450},	//AUTOMATIC OUTDOOR
	},
	{
		12,
		{{750,1350,2150,3100,-2000,4000,-2500,6100,1300,900,2000,1400,1},	// 0	INCANDESCENT
		 {800,1800,1600,2850,-2000,4000,-2000,6000,1500,-150,1400,900,2},	// 1    D4000
		 {1200,1800,1300,2100,-1500,3350,-1300,4050,1000,50,1000,650,4},	// 2	D5000
		 {1300,1900,1180,1800,-1000,2650,-1000,3550,1400,-1000,1000,100,8},	// 3    SUNNY
		 {1450,2030,880,1550,-1000,2550,-1000,3420,1000,-900,1000,-100,4},	// 4    CLOUDY
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 5    FLASH
		 {1450,1550,1500,2000,-3000,6000,-1500,4200,1000,550,1000,0,-1},	// 6	green
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 7    FLUORESCENT_H
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	//UNDER WATER
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 }}//CUSTOM
	},
	{	{ 0 ,6},	//LUT num. AUTOMATIC  INDOOR
		{ 0, 1},	//LUT num. INCANDESCENT
		{ 1, 1},	//LUT num. D4000
		{ 2, 1},	//LUT num. D5000
		{ 2, 5},	//LUT num. SUNNY
		{ 4, 3},	//LUT num. CLOUDY
		{ 7, 1},	//LUT num. FLASH
		{ 8, 1},	//LUT num. FLUORESCENT
		{ 9, 1},	//LUT num. FLUORESCENT_H
		{11, 1},	//LUT num. UNDER WATER
		{11, 1},	//LUT num. CUSTOM
		{ 0, 7},	//LUT num. AUTOMATIC  OUTDOOR
	 }
};
u32 ar0130_ae_agc_dgain[AGC_DGAIN_TABLE_LENGTH]=
{
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
		1024,

	};
/* 720p & 1280x960 use the same sht dgain table (calculated in fps25) */
u32 ar0130_ae_sht_dgain_720p30[SHUTTER_DGAIN_TABLE_LENGTH]={
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1022,1048,1024,1031,1026,1034,1044,1028,1024,1051,1026,1026,1024,1005,1040,
	1035,1024,1027,1031,1022,1024,1005,1011,1042,1024,1031,1026,1036,1045,1032,1024,
	1028,1030,1023,1024,1005,1012,1045,1027,1037,1038,1024,1059,1048,1033,1040,1024,
	1042,1046,1024,1017,1020,1025,1023,1024,1002,1007,1009,1018,1025,1024,1005,1014,
	1041,1025,1034,1026,1014,1024,1043,1034,1040,1024,1017,1024,1038,1034,1040,1020,
	1019,1024,1036,1037,1041,1018,1021,1024,1004,1048,1051,1032,1040,1041,1024,1067,
	1061,1040,1045,1036,1018,1024,1055,1042,1051,1039,1029,1038,1024,1057,1065,1046,
	1040,1047,1027,1024,1074,1053,1054,1060,1038,1040,1045,1024,1070,1071,1046,1049,
	1048,1024,1028,1024,1051,1060,1055,1039,1049,1040,1028,1038,1024,1063,1069,1048,
	1043,1048,1023,1023,1024,1053,1061,1061,1042,1051,1045,1032,1042,1029,1024,1084,
	1061,1060,1063,1038,1042,1039,1017,1024,1072,1060,1069,1051,1048,1055,1031,1036,
	1036,1016,1024,1075,1064,1074,1055,1053,1059,1036,1043,1042,1024,1097,1082,1072,
	1079,1055,1055,1057,1033,1040,1030,1016,1024,1074,1074,1080,1057,1065,1062,1046,
	1057,1042,1038,1046,1024,1102,1101,1081,1090,1076,1069,1076,1053,1057,1056,1035,
	1044,1031,1024,1110,1085,1088,1085,1065,1074,1057,1052,1057,1032,1038,1031,1015,
	1024,1090,1090,1094,1071,1081,1070,1061,1070,1046,1051,1049,1032,1042,1026,1024,
	1122,1099,1108,1097,1087,1096,1071,1076,1073,1054,1064,1047,1044,1048,1025,1032,
	1024,1115,1124,1101,1102,1103,1081,1089,1076,1068,1075,1050,1054,1051,1031,1041,
	1025,1019,1024,1116,1124,1122,1110,1107,1114,1091,1096,1097,1076,1084,1079,1063,
	1073,1059,1052,1061,1041,1040,1046,1024,1160,1161,1137,1146,1137,1121,1130,1113,
	1107,1114,1090,1092,1094,1071,1077,1071,1054,1061,1047,1039,1046,1025,1024,1180,
	1154,1161,1158,1138,1148,1134,1125,1133,1111,1111,1115,1091,1098,1092,1076,1085,
	1067,1064,1069,1046,1051,1048,1029,1037,1024,1193,1203,1176,1179,1180,1157,1167,
	1153,1144,1153,1128,1130,1131,1109,1118,1106,1096,1105,1080,1083,1082,1061,1070,
	1056,1049,1055,1031,1036,1032,1014,1024,1218,1214,1221,1195,1202,1196,1179,1191,
	1171,1169,1173,1148,1156,1148,1135,1145,1122,1123,1125,1103,1112,1099,1091,1099,
	1074,1079,1076,1059,1068,1048,1048,1050,1029,1037,1024,1017,1024,1267,1274,1270,
	1251,1264,1241,1242,1246,1221,1232,1219,1210,1220,1193,1200,1197,1178,1190,1170,
	1168,1174,1149,1158,1149,1137,1146,1123,1126,1127,1106,1115,1102,1092,1101,1078,
	1081,1082,1061,1070,1057,1049,1056,1034,1036,1038,1016,1024,1379,1366,1379,1353,
	1355,1361,1332,1342,1337,1318,1330,1311,1305,1315,1288,1292,1296,1269,1278,1274,
	1254,1264,1251,1239,1249,1230,1224,1233,1208,1208,1214,1189,1193,1196,1171,1177,
	1177,1154,1161,1157,1136,1144,1137,1119,1128,1118,1104,1112,1098,1088,1096,1078,
	1072,1080,1060,1057,1062,1040,1040,1045,1021,1024,1602,1570,1580,1582,1553,1563,
	1562,1533,1547,1541,1517,1530,1519,1500,1513,1498,1484,1496,1477,1466,1480,1455,
	1449,1461,1435,1433,1443,1413,1415,1424,1393,1399,1404,1374,1382,1382,1356,1365,
	1362,1338,1348,1340,1320,1331,1318,1303,1314,1298,1287,1296,1278,1269,1279,1259,
	1252,1261,1238,1234,1242,1217,1216,1223,1198,1200,1204,1178,1182,1185,1159,1165,
	1164,1140,1148,1144,1122,1130,1123,1105,1113,1103,1087,1095,1082,1071,1078,1062,
	1053,1061,1041,1036,1042,1020,1019,1024,2150,2092,2030,1923,1866,1800,1698,1641,
	1566,1473,1416,1333,1249,1189,1101,1024,
};

u8 ar0130_dlight[2] = {128,4};
